package com.lphl.pet.activity;

import com.lphl.pet.R;
import com.lphl.pet.adapter.SearchDeviceAdapter;
import com.skyfishjy.library.RippleBackground;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class SerchDeviceActivity extends Activity implements OnClickListener {

	private ImageView iv_back;
	private TextView tv_begin;
	private ListView lv_seach_device;
    private ImageView start_serch;
    private  RippleBackground rippleBackground;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_serch_device);

		initView();

	}

	private void initView() {
		iv_back = (ImageView) findViewById(R.id.iv_back);
        start_serch = (ImageView) findViewById(R.id.start_serch);
		tv_begin = (TextView) findViewById(R.id.tv_begin);

        rippleBackground = (RippleBackground)findViewById(R.id.content);
		lv_seach_device = (ListView) findViewById(R.id.lv_seach_device);

        start_serch.setOnClickListener(this);
		iv_back.setOnClickListener(this);
		tv_begin.setOnClickListener(this);
		
		lv_seach_device.setAdapter(new SearchDeviceAdapter(SerchDeviceActivity.this));
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.iv_back:
			this.finish();
			break;

		case R.id.tv_begin:
			
			break;

        case R.id.start_serch:
            rippleBackground.startRippleAnimation();
            Toast.makeText(SerchDeviceActivity.this,"搜索开启", 0).show();
            break;
			
		default:
			break;
		}
	}
}
